package com.yvon.maple.service.system.vo;

import com.yvon.boot.common.validation.annotation.Phone;
import com.yvon.boot.common.validation.group.CreateGroup;
import com.yvon.maple.enums.GenderEnum;
import com.yvon.maple.pojo.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
import java.util.Set;

/**
 *
 * @author : yvon
 * @time : 2020-8-1
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("新增用户请求参数")
public class UserVO extends BaseVO implements Serializable {

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名(不允许更新)", required = true)
    @NotBlank(groups = {CreateGroup.class}, message = "用户名不能为空")
    private String username;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称", required = true)
    @NotBlank(groups = {CreateGroup.class}, message = "昵称不能为空")
    private String nickname;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码(不允许更新)", required = true)
    @NotBlank(groups = {CreateGroup.class}, message = "密码不能为空")
    private String password;


    /**
     * 角色编码
     */
    @ApiModelProperty(name = "角色编码")
    private List<Long> roleIds;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    @Phone
    private String phone;


    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @Email
    private String email;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    private String avatar;

    /**
     * 性别(1-男，2-女，3-保密)默认为3
     */
    @ApiModelProperty( value = "性别(1-男，2-女，3-保密)")
    private GenderEnum gender;

    /**
     * 启用
     */
    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;

    /**
     * 照片
     */
    @ApiModelProperty(value = "是否启用")
    private Set<String> photo;
}
